package cn.iot.sys.service.impl;

import cn.iot.sys.dao.GradeDao;
import cn.iot.sys.entity.Grade;
import cn.iot.sys.service.GradeService;
import cn.iot.sys.vo.AddForm;
import cn.iot.sys.vo.GradeDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GradeServiceImpl implements GradeService {
    @Autowired
    private GradeDao gradeDao;
    @Override
    public List<Grade> list ( GradeDto grade ) {
        return gradeDao.list(grade);
    }

    @Override
    public int getCount ( GradeDto grade ) {
        return gradeDao.getCount ( grade );
    }

    @Override
    public void add ( AddForm addon ) {
        gradeDao.add(addon);
    }

    @Override
    public void update ( AddForm addon ) {
        gradeDao.update(addon);
    }

    @Override
    public int del ( int id ) {
        return gradeDao.delete(id);
    }

    @Override
    public void qiDong ( Grade[] addon ) {
        gradeDao.qiDong(addon);
    }

    @Override
    public void jinDong ( Grade[] addon ) {
        gradeDao.jinDong ( addon );
    }
}
